import Taro from '@tarojs/taro'
import ClassName from 'classnames'
import { Text } from '@tarojs/components' 
import './index.scss'
import './iconfont.css'


    const  LiIcon = () => {
        const defaultProps = {
            size: 26,
            name: '',
            color: '#666',
            itemStyle: {},
            rotate: 0
          }
          const { size, color, name, itemStyle, rotate } = defaultProps

          const fontSize = Taro.pxTransform(Number(size))
          const style = { ...itemStyle, color, fontSize }
          if (rotate !== 0) style.transform = `rotate(${rotate}deg)`
          const Cls = ClassName({
            'iconfont': true
          }, name)
          return (
            <Text className={Cls} style={style}></Text >
          )


    }
 export default LiIcon